<%@ taglib prefix="uthink" uri="/WEB-INF/tld/shiros.tld"%>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,member-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />

<link href="lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet"
	type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>品牌管理</title>

</head>
<body>
	<nav class="breadcrumb">
		<i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>
		特卖汇中心 <span class="c-gray en">&gt;</span> 列表

		<a class="btn btn-success btn-refresh radius r mr-20"
			style="line-height: 1.6em; margin-top: 3px"
			onclick="javascript:location.replace(location.href);"
			href="javascript:location.replace(location.href);" title="刷新">刷新</a>
	</nav>
	<div class="pd-20">
	<div class="text-c">
			<form action="<%=path%>/backstage/goods-search" method="get" class="form form-horizontal" id="search-form"	onsubmit="beforSubmit()">
				<div class="text-c">
					<div class="row cl">
						<label class="form-label col-1">专场名称：</label>
						<div class="formControls col-2">
							<input type="text" name="scName" value=""
								id="name" placeholder="商品名称或ID" class="input-text col-2">
						</div>
					<label class="form-label col-1">分类名称：</label>
						<div class="formControls col-2">
							<span class="select-box"> <select class="select"
								name="type" id="type">
									<option value="-1">--请选择--</option>
									<c:forEach items="${types}" var="type">
										<option value="${type.C_CODE}">${type.C_NAME}</option>
									</c:forEach>
							</select>
							</span>
						</div>
						<label class="form-label col-1">状态:</label>
						<div class="formControls col-2">
							<span class="select-box"> <select class="select"
								name="status" id="type">
									<option value="-1">--请选择--</option>
									<option value="0">即将开始</option>
									<option value="1">进行中</option>
									<option value="2">已结束</option>
					</select>
							</span>
						</div>
							</div>
					 </form>
						<button name="" id="" class="btn btn-success"
						style="border-radius: 5px; float: right;" type="submit">
						查询</button>
					</div>

              
		<div class="mt-20">
			<table
				class="table table-border table-bordered table-hover table-bg table-sort">
				<thead>
					<tr class="text-c">
						<th width="80">专场名称</th>
						<th>分类</th>
						<th>图片</th>
						<th>专场时间</th>
						<th width="100">商品数</th>
						<th width="120">状态</th>
						<th width="150">操作</th>
					</tr>
				</thead>
				<tbody>
					<c:choose>
						<c:when test="${empty list}">
							<tr class="text-c">
								<td colspan="7">暂无数据</td>
							</tr>
						</c:when>
						<c:otherwise>
							<c:forEach items="${list}" var="var">
								<tr class="text-c">
									

									<td>${var.title}<input type="hidden" id="sc_id" name="sc_id" value='${var.topic_id}' /></td> 
								<td>
								<c:forEach items="${types}" var="type">
								<c:if test="${type.C_CODE==var.type_id}">
									${type.C_NAME}
								</c:if>
							</c:forEach>
							</td>
									
									<td><img src="<%=imagePath%>${var.topic_img}"  style="height:30px"/></td>
								<td>${var.start_date} ${var.start_time}-${var.end_time}</td>
								<td>${var.numx}<input type="hidden" value='${var.topic_id}' /></td>
									<td><c:choose>
								<c:when test="${var.statusTip==1}">
									<span class="label label-success radius">进行中</span>
								</c:when>
								<c:when test="${var.statusTip==2}">
									<span class="label label-primary radius">已结束</span>
								</c:when>
								<c:when test="${var.statusTip==0}">
									<span class="label label-warning radius">即将开始</span>
								</c:when>
								<c:otherwise>
									<span class="label label-disabled  radius">未知</span>
								</c:otherwise>
							</c:choose></td>
									
									<td class="td-manage">
										<a onClick="layer_show(this,'<%=path%>/backstage/speChangForDialog?typeId=${var.type_id }&topicId=${var.topic_id }&memberId=${var.member_id}',600,500)" href="javascript:void(0);" title="添加">添加商品</a>
										&nbsp;&nbsp;
										<a onClick="t_sp_edit(this,'${var.topic_id}','edit')" href="javascript:void(0);" title="编辑">编辑</a>
										&nbsp;&nbsp;
										<a onClick="t_sp_delete(this,'${var.topic_id}')" href="javascript:void(0);" title="删除">删除</a></td>
								</tr>
							</c:forEach>
						</c:otherwise>
					</c:choose>

				</tbody>
			</table>
		</div>
		</div>
	<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="lib/layer/1.9.3/layer.js"></script>
    <script type="text/javascript" src="js/H-ui.admin.js"></script>
	<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
	<script type="text/javascript" src="lib/My97DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
   <script type="text/javascript" src="js/H-ui.js"></script>
	<script type="text/javascript" src="js/H-ui.admin.js"></script>
	<script type="text/javascript"
		src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
    <script type="text/javascript" src="js/jquery.pagination.js"></script>
	<script type="text/javascript">
		$(function() {
			$('.table-sort').dataTable({
				"aaSorting" : [ [ 0, "desc" ] ],//默认第几个排序
				"bStateSave" : true,//状态保存
				   bFilter: false,    //去掉搜索框方法三：这种方法可以
                 bLengthChange: false,   //去掉每页显示多少条数据方法
				"aoColumnDefs" : [
				//{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
				{
					"orderable" : false,
					"aTargets" : [ 1, 2 ]
				} // 制定列不参与排序
				]
			});
	datable.fnClearTable();
		});
		//datable.fnClearTable();
		var  base_path = "<%=path%>";
	</script>
	<script type="text/javascript" src="js/speChang_list.js"></script>
</body>
</html>



